package com.thread.plbc;

/**
 * @author げっしょく
 * @date 2021/8/5
 */
public class ThreadD3exer implements Runnable{
    boolean run = true;

    @Override
    public void run() {

            for (int i = 0; i < 10000; i++) {
                if(run){
                    System.out.println(Thread.currentThread().getName() +  "线程 -->" + i);
                try {
                    Thread.sleep(3 );
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName() +  "线程 -->" + i);
            }else{
                    return;
            }
        }
    }
}
